package com.java1234.mapper;

import com.java1234.entity.DeptTrendVO;
import com.java1234.entity.Jixiaokaohe;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.java1234.entity.PerformanceEvaluation;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 绩效考核 Mapper 接口
 * </p>
 *
 * @author zhai
 * @since 2025-05-09
 */
@Mapper
public interface JixiaokaoheMapper extends BaseMapper<Jixiaokaohe> {

    /**
     * 查询所有月份的绩效考核数据
     * @return 绩效考核结果列表
     */
    List<PerformanceEvaluation> findAllMonthPerformanceEvaluations();

    /**
     * 按时间范围查询绩效考核数据
     * @param startMonth 开始月份 (格式: YYYY-MM)
     * @param endMonth 结束月份 (格式: YYYY-MM)
     * @return 绩效考核结果列表
     */
    List<PerformanceEvaluation> findPerformanceEvaluationsByDateRange(
            @Param("startMonth") String startMonth,
            @Param("endMonth") String endMonth,
            @Param("username") String username);

    /**
     * 获取所有有绩效记录的月份
     * @return 格式为["2023-01", "2023-02", ...]的列表
     */
    List<String> selectAvailableMonths();
}
